﻿using Singer.Shared.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Singer.Shared.Modularity
{
    public class UserContextAccessor : IUserContextAccessor
    {
        AsyncLocal<IUserContext?> _asyncLocal { get; set; } = new AsyncLocal<IUserContext?>();

        public IUserContext? UserContext
        {
            get => _asyncLocal.Value;
            set => _asyncLocal.Value = value;
        }
    }
}
